# 该镜像需要依赖的基础镜像
FROM java:8
# 指定维护者的名字
MAINTAINER zhanghang
VOLUME /tmp
RUN echo "export LC_ALL=zh_CN.UTF-8"  >>  /etc/profile
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 将当前目录下的jar包复制到docker容器的/目录下
ADD ./springboot-docker-0.0.1-SNAPSHOT.jar springboot-docker-0.0.1-SNAPSHOT.jar
RUN bash -c 'touch /springboot-docker-0.0.1-SNAPSHOT.jar'

# 指定docker容器启动时运行jar包
ENTRYPOINT ["java","-jar","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8022","/springboot-docker-0.0.1-SNAPSHOT.jar"]